correct input validation for interpolate time option. (#1025)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Mon, 6 Mar 2023 14:12:58 +0000 (07:12 -0700)
committerGitHub <noreply@github.com>
Mon, 6 Mar 2023 14:12:58 +0000 (07:12 -0700)
* fix input validation on interpolate time option.

* update filter info for interpolate time option.

interpolate.h
reference/filter1.txt

index 99b3ea14771b74f43246a06a7941d3da2877fe71..5aabe1aa258c857a34e42318c115618c15444a50 100644 (file)
@@ -52,7 +52,7 @@ private:
   QVector<arglist_t> args = {
     {
       "time", &opt_time, "Time interval in seconds", nullptr,
-      ARGTYPE_BEGIN_EXCL | ARGTYPE_BEGIN_REQ | ARGTYPE_INT,
+      ARGTYPE_BEGIN_EXCL | ARGTYPE_BEGIN_REQ | ARGTYPE_FLOAT,
       "0", nullptr, nullptr
     },
     {
index 8e90e9306004e2cb8e41786e6de5adb93e435151..cab7d2b7c9ac4b4ef425d11db7b93822373d2f59 100644 (file)
@@ -21,7 +21,7 @@ option        radius  nosort  Inhibit sort by distance to center      boolean                         https://www.g
 option radius  maxcount        Output no more than this number of points       integer         1               https://www.gpsbabel.org/WEB_DOC_DIR/filter_radius.html#fmt_radius_o_maxcount
 option radius  asroute Put resulting waypoints in route of this name   string                          https://www.gpsbabel.org/WEB_DOC_DIR/filter_radius.html#fmt_radius_o_asroute
 interpolate    Interpolate between trackpoints https://www.gpsbabel.org/WEB_DOC_DIR/filter_interpolate.html
-option interpolate     time    Time interval in seconds        integer         0               https://www.gpsbabel.org/WEB_DOC_DIR/filter_interpolate.html#fmt_interpolate_o_time
+option interpolate     time    Time interval in seconds        float           0               https://www.gpsbabel.org/WEB_DOC_DIR/filter_interpolate.html#fmt_interpolate_o_time
 option interpolate     distance        Distance interval in miles or kilometers        string                          https://www.gpsbabel.org/WEB_DOC_DIR/filter_interpolate.html#fmt_interpolate_o_distance
 option interpolate     route   Interpolate routes instead      boolean                         https://www.gpsbabel.org/WEB_DOC_DIR/filter_interpolate.html#fmt_interpolate_o_route
 height Manipulate altitudes    https://www.gpsbabel.org/WEB_DOC_DIR/filter_height.html